package vcp.controllers;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import vcp.common.*;
import vcp.models.MainModel;
import vcp.views.MainView;

public class MainController extends AbstractController implements ActionListener,
                                                                  IController
{
    private MainModel model;
    private MainView view;
    public MainController(){
    	System.out.println(this.getClass().toString()); 
    }
	
	public void addModel(Object model){
		System.out.println(this.getClass().toString()+":application model");
		this.model = (MainModel)model;
	} //addModel()
	
	public void addView(Object applicationView){
		System.out.println(this.getClass().toString()+":application view");
		this.view = (MainView)applicationView;
	} //addView()

	
	@Override
	public void actionPerformed(ActionEvent e) {
		String cmd = e.getActionCommand();
		model.setPane(cmd);		
	}
     
}
